﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;
using System.Data.SqlClient;

namespace AMix
{
    public partial class StocFapticFrm : FrmRezumat
    {
        public StocFapticFrm(ModuleClass mInfo)
            : base(mInfo)
        {
            InitializeComponent();
            workConnString = mInfo.workConnectionString;
            ActiveControl = amixRegistruDGV;
        }

        private void StocFapticFrm_Load(object sender, EventArgs e)
        {
            
            SqlConnection con = DeschideConexiune(workConnString);
            departamenteTableAdapter.Connection = con;
            departamenteTableAdapter.Fill(eSRPDataSet.Departamente, ModuleInfo.CodUnitate);
            this.amixTipStareTableAdapter.Connection = con;
            this.amixTipStareTableAdapter.Fill(this.eSRPDataSet.AmixTipStare);

            this.amixRegistruTableAdapter.Connection = con;
            this.amixRegistruTableAdapter.Fill(this.eSRPDataSet.AmixRegistru, ModuleInfo.CodUnitate,0,5);


            InchideConexiune(con);
           
            this.listBndSourceMain.Add(amixRegistruBindingSource);
            listTableAdaptor.Add(amixRegistruTableAdapter.Adapter);
            HandleSalvare += new EventHandler(Salvare);
        }

        
    }
}
